ASID: Optimize hvm_flush_guest_tlbs
In our testing, we found that function hvm_flush_guest_tlbs() is used
very frequently and it will always force asid recycling and will
result a whole tlb flush immediately no matter there are still free
asids or not. Actually, in this case, just increasing core generation
might be enough and the remaining asids can still be used until
next_asid > max_asid.
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Reviewed-by: Wei Huang <wei.huang2@amd.com>
Simplify the logic and also fix a very minor bug in
hvm_asid_handle_vmenter(), in the case that hvm_asid_flush_core() sets
data->disabled.
Signed-off-by: Keir Fraser <keir@xen.org>